import pymysql
class A3mall():
    def __init__(self,user,password,host,data):
        self.con=pymysql.connect(user=user,password=password,host=host,database=data)
        self.cur=self.con.cursor()
    def cx(self,sql):
        self.cur.execute(sql)
        return self.cur.fetchall()
    def tc(self):
        self.cur.close()
        self.con.close()